import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/user/userInfo',
    method: 'get'
  })
}

export function getUser(id) {
  return request({
    url: `/user/getUser/${id}`,
    method: 'get'
  })
}
export function deleteUser(userName) {
  return request({
    url: `/user/deleteUser/${userName}`,
    method: 'delete'
  })
}
export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}
export function pageUser(data) {
  return request({
    url: '/user/pageUser',
    method: 'post',
    data
  })
}
export function registerUser(data) {
  return request({
    url: '/user/registerUser',
    method: 'put',
    data
  })
}
export function editUser(data) {
  return request({
    url: '/user/editUser',
    method: 'post',
    data
  })
}
export function getDesignerList() {
  return request({
    url: '/user/getDesignerList',
    method: 'get',
  })
}
export function getSupervisorList() {
  return request({
    url: '/user/getSupervisorList',
    method: 'get',
  })
}
export function getReviewerList() {
  return request({
    url: '/user/getReviewerList',
    method: 'get',
  })
}
